package com.yjhb.android.sbz.fragment.mytask;

import android.view.View;

import com.yjhb.android.sbz.dialog.CommentDialog;
import com.yjhb.android.sbz.tool.EventMsg;
import com.yjhb.android.sbz.entity.MyTask;
import com.yjhb.android.sbz.enums.TaskStatus;

/**
 * 创建者 zx
 * 创建时间 2020/12/17 15:08
 */
public class PassFragment extends MyTaskListFragment {
    private final String TAG = "PassFragment";

    @Override
    public CharSequence getTitle() {
        return "已通过";
    }

    @Override
    protected void onLoadData(int size, int current) {
        presenter.getOrderList(TaskStatus.TASK_STATUS_PASS.getStatus(),size,current);
    }

    @Override
    public void onViewClick(View view, String msg, int index, Object o) {
        MyTask myTask = (MyTask) o;
        if (msg.equals("btn1")){
            CommentDialog commentDialog  = new CommentDialog(this,myTask);
            commentDialog.show();
        }
    }

    @Override
    public void onEventMsg(EventMsg msg) {
        super.onEventMsg(msg);
        if (msg.msg == EventMsg.REQUEST_MY_TASK_LIST_UPDATE) {
            current = 1;
            onLoadData(size, current);
        }
    }

}
